package com.wjj.sixinone.common.enums;

import lombok.Getter;


@Getter
public enum ExceptionEnum {
    /**
     * 文件类型错误时使用
     */

    USERNAME_EXIST(400, "用户名已经存在！"),
    INVALID_FILE_TYPE(400, "无效的文件类型！"),

    INVALID_PARAM_ERROR(400, "无效的请求参数！"),
    INVALID_PHONE_NUMBER(400, "无效的手机号码"),
    INVALID_TOKEN   (401, "无效的token！"),
    INVALID_VERIFY_CODE(400, "验证码错误！"),
    INVALID_USERNAME_PASSWORD(400, "无效的用户名和密码！"),
    INVALID_SERVER_ID_SECRET(400, "无效的服务id和密钥！"),
    INVALID_NOTIFY_PARAM(400, "回调参数有误！"),
    INVALID_NOTIFY_SIGN(400, "回调签名有误！"),

    UPDATE_ERROR(400, "更新失败！"),
    INSERT_ERROR(400, "插入失败！"),
    DELETE_ERROR(400, "删除失败！"),
    SELECT_ERROR(400, "查询失败！"),

    INVALID_AUTH_ERROR(401,"权限错误"),

    EMAIL_ALREADY_SEND(400,"邮件发送频繁"),
    CODE_EXPRESS(400,"验证码已经过期"),
    DATABASE_AUTH_ERROR(403,"非法数据库操作"),
    CODE_ERROR(400,"验证码错误"),
    ERROR_REQUEST_CONTEXT(403,"获取请求上下文失败"),
    ERROR_MINIO_SEND(400,"文件上传失败"),
    ERROR_EXCEL_ERROR(400,"excel解析失败"),

    UNAUTHORIZED(401, "登录失效或未登录！"),
    FACE_ERROR(400,"人脸识别失败" ),
    FACE_REGISTER_ERROR(400,"人脸注册失败" ),
    INSTRUMENT_NO_EXIST(400, "编号已经存在"),
    BED_FULL(400,"该房间床位已满" ), BED_EXIST(400,"床位已经存在" ),
    ALREDY_BAN_IP(400,"ip已经被封禁" ),
    ERROR_REQUEST(400,"请求超限，IP 已被封禁" );



    /**
     * 状态码
     */
    private final int status;
    /**
     * 异常信息
     */
    private final String message;

    ExceptionEnum(int status, String message) {
        this.status = status;
        this.message = message;
    }
}
